package com.qc.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.qc.dao.AuthenticationDao;
import com.qc.entity.Authentication;
import com.qc.entity.UserBossEntity;
import com.qc.entity.UserSecretaryEntity;
import com.qc.service.AuthenticationService;

@Service("authenticationService")
public class AuthenticationServiceImpl implements AuthenticationService{

	@Resource(name="authenticationDao")
	private AuthenticationDao authenticationDao;
	
	@Override
	public int saveAuthentication(Authentication authentication) {
		
		return authenticationDao.saveAuthentication(authentication);
	}

	@Override
	public int deleteAuthenticationId(long id) {

		return authenticationDao.deleteAuthenticationId(id);
	}

	@Override
	public int updateAuthenticationId(Authentication authentication) {

		return authenticationDao.updateAuthenticationId(authentication);
	}

	@Override
	public Authentication getAuthentication(String id) {

		return authenticationDao.getAuthentication(id);
	}

	@Override
	public UserSecretaryEntity getSecretaryId(String userId) {
		
		return authenticationDao.getSecretaryId(userId);
	}

	@Override
	public UserBossEntity getUserBossId(String userId) {

		return authenticationDao.getUserBossId(userId);
	}

}
